package
{
	import flash.display.DisplayObject;
	import flash.display.Sprite;
	import flash.utils.getDefinitionByName;

	public class Test extends Sprite
	{
		private var bgColor:uint = 0xFFCC00;
		private var size:uint = 80;

		public function Test()
		{
			var ClassReference:Class = getDefinitionByName("flash.display.Sprite") as Class;
			var instance:Object = new ClassReference();
			instance.graphics.beginFill(bgColor);
			instance.graphics.drawRect(0, 0, size, size);
			instance.graphics.endFill();
			addChild(DisplayObject(instance));
		}
	}
}
